<?php

namespace App\Models\Admin;

use Illuminate\Database\Eloquent\Model;

/**
 * Class Company
 */
class Company extends Model
{
    protected $table = 'company';

    public $timestamps = true;

    protected $fillable = [
        'company_name',
        'registration_number',
        'unified_code',
        'company_registered_address',
        'legal_representative',
        'registered_capital',
        'company_type',
        'company_registration_time',
        'operation_period_start',
        'operation_period_end',
        'business_scope',
        'registration_authority',
        'organizer_province',
        'organizer_city',
        'year',
        'contacts_name',
        'contacts_emal',
        'contacts_phone',
        'id_card',
        'business_license',
        'status',
        'effective_date'
    ];

    protected $guarded = [];


    /**
     * @param \DateTime|int $value
     * @return false|int
     * @author dividez
     */
    public function fromDateTime($value){
        return strtotime(parent::fromDateTime($value));
    }
}